package com.leen.admin.entity;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.*;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;


import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.validator.constraints.NotEmpty;


/**
 * @author 
 * 数据字典详情
 */
@Setter
@Getter
@Table(name="dict_detail")
@Entity
@ToString(callSuper = true)
public class DictDetail implements Serializable {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @NotNull(message = "字典编号不能为空")
    @Column(name = "id")
    private Long id;

    /**
     * 字典标签
     */
    @NotEmpty
    @NotBlank(message = "字典标签不能为空")
    @Column(name = "label")
    private String label;


    /**
     * 字典值
     */
    @NotEmpty
    @NotBlank(message = "字典值不能为空")
    @Column(name = "value")
    private String value;

    /**
     * 排序
     */
    @Column(name = "sort")
    private String sort;

    /**
     * 字典id
     */
    @Column(name = "dict_id")
    private Long dictId;

    /**
     * 创建日期
     */
    @JSONField(format = "yyyy-MM-dd HH:mm")
    @Column(name = "create_time")
    private Date createTime;

    @JSONField(format = "yyyy-MM-dd HH:mm")
    @Column(name = "update_time")
    private Date updateTime;

    @Column(name = "is_del")
    private Byte del;


    private static final long serialVersionUID = 1L;
}